package com.smmisia.article.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.smmisia.article.dto.article.ArticleAddRequest;
import com.smmisia.article.dto.article.ArticleHotResponse;
import com.smmisia.article.dto.article.ArticleUpdateDTO;
import com.smmisia.article.dto.likeFavorite.LikeFavoriteRequest;
import com.smmisia.article.entity.Article;
import com.smmisia.article.response.RankResponse;
import com.smmisia.article.response.VisitorResponse;
import com.smmisia.article.response.article.ArticleResponse;
import com.smmisia.common.Result.Result;
import jakarta.servlet.http.HttpServletResponse;

import java.io.IOException;
import java.util.List;
import java.util.Map;


public interface ArticleService extends IService<Article> {

    Result<List<ArticleResponse>> listArticle(Integer pageNum, Integer pageSize, Integer id, Integer type);

    Result<String> add(ArticleAddRequest articleAddRequest);

    Result<String> updateArticle(ArticleUpdateDTO articleUpdateDTO);

    Result<ArticleHotResponse> hotspot();

    Result<String> like(LikeFavoriteRequest likeFavoriteRequest);

    Result<String> favorite(LikeFavoriteRequest likeFavoriteRequest);

    Result<List<ArticleResponse>> likeInfo(Integer id, Integer pageNum, Integer pageSize, Integer type);

    ArticleResponse getArticle(List<Article> articles);

    void export(HttpServletResponse response) throws IOException;

    void newExport(HttpServletResponse response) throws IOException;

    Map<String, Object> importDBFromExcel10w(List<Map<Integer, String>> dataList);

    Result<List<ArticleResponse>> listArticleNotes(Integer pageNum, Integer pageSize);

    Result<List<ArticleResponse>> listArticleStrategy(Integer pageNum, Integer pageSize);

    Result<String> deletes(Integer id);

    Result<String> hidden(Integer id);

    Result<List<ArticleResponse>> articleList(Integer pageNum, Integer pageSize);

    Result<List<ArticleResponse>> articleById(Integer id);

    Result<List<ArticleResponse>> articleFriendList();

    Result<List<ArticleResponse>> articleFollowList();

    Result<List<ArticleResponse>> likeSearch(String keyword);

    Result<VisitorResponse> visitor();

    Result<List<RankResponse>> rank();

    Result<List<ArticleResponse>> article(Integer pageNum, Integer pageSize, Integer id);

    Result<List<ArticleResponse>> articleEs(String keyword,Integer pageNum,Integer pageSize,Integer lastId);
}
